package com.zd.shopping.utils;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.zd.shopping.MainActivity;
import com.zd.shopping.activity.DeliverDetailsActivity;
import com.zd.shopping.activity.DeliverGoodsActivity;
import com.zd.shopping.activity.DeliverGoodsDtActivity;
import com.zd.shopping.activity.NuclearGoodsActivity;
import com.zd.shopping.activity.NumclearDetailsActivity;


/**
 * Created by Administrator on 2019/5/17 0017.
 * 跳转界面的工具类
 */

public class RouterUtils {
    //主界面
    public static void openMianActivity(Activity activity) {
        activity.startActivity(new Intent(activity, MainActivity.class));
        activity.overridePendingTransition(0, 0);//去掉Activity切换间的动画
        activity.finish();
    }


    public static void openNuclearGoodsActivity(Activity activity) {
        activity.startActivity(new Intent(activity, NuclearGoodsActivity.class));
        activity.overridePendingTransition(0, 0);//去掉Activity切换间的动画
    }
    public static void openNumclearDetailsActivity(Context context,String id) {
        Intent intent = new Intent(context, NumclearDetailsActivity.class);
        intent.putExtra("id",id);
        context.startActivity(intent);
    }
    public static void openDeliverDetailsActivity(Context context,String id) {
        Intent intent = new Intent(context, DeliverDetailsActivity.class);
        intent.putExtra("id",id);
        context.startActivity(intent);
    }
    public static void openDeliverGoodsActivity(Activity activity) {
        activity.startActivity(new Intent(activity, DeliverGoodsActivity.class));
        activity.overridePendingTransition(0, 0);//去掉Activity切换间的动画
    }
    public static void openDeliverGoodsDtActivity(Activity activity) {
        activity.startActivity(new Intent(activity, DeliverGoodsDtActivity.class));
        activity.overridePendingTransition(0, 0);//去掉Activity切换间的动画
    }
}
